const http = require("http");
let data = {
	user:[{name:'zouc'}]
}
http.createServer(function(request, response) {
	console.log(request.method )
	if(request.url==='/login'){
		response.writeHead(200, {"Content-Type": "text/plain"});
		response.end(JSON.stringify(data.user));
	}else{
		response.writeHead(200, {"Content-Type": "text/plain"});
		response.write("Hello World");
		response.end();
	}
    
	
}).listen(8888,()=>{
	console.log('服务端启动')
});